package com.windersgroup.querynumber.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.windersgroup.querynumber.entity.MachineNumberRecord;
import com.windersgroup.querynumber.mapper.MachineNumberMapper;
import com.windersgroup.querynumber.service.MachineNumberService;

@Service("machineNumberService")
public class MachineNumberRecordImpl implements MachineNumberService {

	@Autowired
	private MachineNumberMapper machineNumberMapper;
	
	@Override
	public List<MachineNumberRecord> findAll(String todayStr) {
		return machineNumberMapper.findAll(todayStr);
	}

	@Override
	public int insertNum(MachineNumberRecord rec) {
		return machineNumberMapper.insertNum(rec);
	}

	@Override
	public Integer getMaxNumToday(String dateStr) {
		return machineNumberMapper.getMaxNumToday(dateStr);
		
	}

	@Override
	public List<MachineNumberRecord> findDataForMap() {
		return machineNumberMapper.findDataForMap();
	}

	@Override
	public List<MachineNumberRecord> findDataByUserAndDate(String dateStr, String userIp) {
		return machineNumberMapper.findDataByUserAndDate(userIp, dateStr);
	}

	
}
